var express = require('express');
var router = express.Router();
// var exec = require('child_process').exec;




router.get('/', function(req, res, next) {
  res.render('index', { title: 'Utopia' });
});


// router.post("/build", function (req, res) {
//     console.log(req.body);
//
//
//     rumCommand('sh', ['./web/Utopia-Server/auto_build.sh'], txt => {
//         console.log(txt);
//         res.send(txt);
//     });
//
//
//
// });


// const rumCommand = (cmd, args, callback) => {
//     const child = exec(cmd, args);
//     let response = 'result = ';
//     // callback("data");
//
//     child.stdout.on('data', buffer => response += buffer.toString());
//     child.stdout.on('end', () => callback(response))
// };


module.exports = router;
